Skip to content

various: internal refactor#1365

Open
NotAShelf wants to merge 5 commits intomainfrom
notashelf/push-qozvyzsvqtmk
Open

various: internal refactor#1365
NotAShelf wants to merge 5 commits intomainfrom
notashelf/push-qozvyzsvqtmk

Conversation

@NotAShelf
Copy link
Owner

This is an internal refactor that aims to be non-breaking as much as possible. There are two changes, with a few more on the way:

  1. There is a new vim.filetype API that can be used to register custom filetypes using vim.filetype.add(). This is placed in the DAG hierarchy before lazyConfigs so it's possible to use the API to register custom filetypes that then get used to lazy-load a plugin on FT.
  2. Moves neovim/mappings to neovim/init/mappings.nix since the neovim/init module is where I've decided to consolidate core Neovim options. This is no longer "init" only, so it'll be renamed in a later PR or on the master branch. Not a breaking change.

This PR has been inspired by, and aims to support, #1304 so I'll be adding vim.ftplugin and vim.ftdetect options as auxiliary module options that the per-language indents can be use with.

Last but not least, I'll go over existing core options and extend options or documentation where applicable. Also CC @horriblename and @Soliprem on something I am not quite sure about: I'd like modules to be able to create their documentation bits to create per-plugin pages, and while NDG does allow this, I am not sure what the API would look like. Should we create a vim.docs module that defines the pages? Is leaking documentation sources to user-space a waste of space?

github-actions bot pushed a commit that referenced this pull request Jan 27, 2026
@github-actions
Copy link

github-actions bot commented Jan 27, 2026

🚀 Live preview deployed from c07410f

View it here:

Debug Information

Triggered by: NotAShelf

HEAD at: notashelf/push-qozvyzsvqtmk

Reruns: 2213

Soliprem
Soliprem previously approved these changes Jan 27, 2026
Copy link
Collaborator

@Soliprem Soliprem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

On adding vim.docs. I can see it being useful. On our side, obviously, for adding documentation for plugins. Even as a user, were it exposed, it might be good as it could still generate a man page, even if it doesn't go to ndg. This would allow for self-documentation when users expose their nvf config as a package, for example (if we do decide to make it generate a man page).

In the meantime, I don't see blockers for this PR if you want to merge and handle docs in another one, so I'll drop an approval

Copy link
Collaborator

@horriblename horriblename left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall looks good, I don't really get what vim.doc is suppose to do so I'd like you to elaborate a bit

i.e. why not just add .md pages in the manual

github-actions bot pushed a commit that referenced this pull request Feb 1, 2026
@NotAShelf
Copy link
Owner Author

overall looks good, I don't really get what vim.doc is suppose to do so I'd like you to elaborate a bit

i.e. why not just add .md pages in the manual

In Nixpkgs, the modules can specify documentation bits under meta.doc to be included in the manual. I have been meaning to introduce something of the same kind in our module system, but in hindsight we could also just... parse meta.doc? That said vim.docs could still be a module that controls whether manpages are included in the closure.

@NotAShelf NotAShelf force-pushed the notashelf/push-qozvyzsvqtmk branch from 09bd743 to f3280eb Compare February 14, 2026 20:46
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I5f5f576642884c09a8e4afc18499ed606a6a6964
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I9b04107496df27dcda1a24ce000da3f46a6a6964
@NotAShelf
Copy link
Owner Author

Still not ready for a merge, but I'd appreciate an updated review.

github-actions bot pushed a commit that referenced this pull request Feb 14, 2026
github-actions bot pushed a commit that referenced this pull request Feb 26, 2026
@snoweuph snoweuph mentioned this pull request Feb 27, 2026
17 tasks
github-actions bot pushed a commit that referenced this pull request Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants